<h1>Search results</h1>

<div>
<%= flash[:notice] %>
</div>

<% for article_source in @article_sources  %>
    <table class="list_article_sources">
        <tr>
            <% for column in ArticleSource.content_columns %>
            <% #Removing body from the list, is too big for a simple list%>
                    <% unless column.name == "body" or column.name == "blurb"%>
                        <th><%= column.human_name %></th>
                    <% end %>
            <% end %>
        </tr>

        <tr>
            <% for column in ArticleSource.content_columns %>
                <% #Removing body from the list, is too big for a simple list%>
                <% unless column.name == "body" or column.name == "blurb"%>
                    <td><%=h article_source.send(column.name) %></td>
                <% end %>
            <% end %>
        </tr>

        <tr>
            <th colspan=4 class="blurb"><%= column.human_name %></th>
        </tr>

        <tr>
            <td colspan=4><%=h article_source.send(column.name) %></td>
        </tr>

        <tr>
            <td colspan=4>
                <table>
                    <tr>
                        <td><%= link_to 'Show', :action => 'show_article_source', :id => article_source %></td>
                    </tr>
                </table>
            </td>
        </tr>

    </table>
<% end %>



<%= link_to 'Previous page', { :page => @article_source_pages.current.previous } if @article_source_pages.current.previous %>
<%= link_to 'Next page', { :page => @article_source_pages.current.next } if @article_source_pages.current.next %>

<br />

<%= link_to 'New article source', :action => 'new_article_source' %>
